<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>拷贝继承</title>
</head>
<body>
	
	<script>
		var p1 = {
			name:'Franyn',
			age:18,
			sex:'男',
			height:'176cm'
		}
		//我现在想创建一个 p2对象 也拥有p1的属性
		// for in 循环
		var p2 = {}
		for (var key in p1){
			
			p2[key] = p1[key]
		}
		p2.name='Jack'
		console.log(p2)
		//我现在有个康康 人 我也有相同的属性 怎么办？

		var p3 = {}
		for (var key in p1){
			
			p3[key] = p1[key]
		}
		p3.name='康康'
		console.log(p3)
		4
		5
		6
		78910
	</script>
</body>
</html>